package com.gisocn.onemap.ui.adapter;

import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import butterknife.internal.Utils;
import com.gisocn.onemap.model.DynamicInfo;
import com.gisocn.onemap.sgzx.R;
import java.util.List;

/* loaded from: classes2.dex */
public class DynamicQueryInfoAdapter extends RecyclerView.Adapter<ViewHolder> {
    private List<DynamicInfo.DetaileInfo> list;

    /* loaded from: classes2.dex */
    public class ViewHolder_ViewBinding implements Unbinder {
        private ViewHolder target;

        public ViewHolder_ViewBinding(ViewHolder viewHolder, View view) {
            this.target = viewHolder;
            viewHolder.tvName = (TextView) Utils.findRequiredViewAsType(view, R.id.tv_name, "field 'tvName'", TextView.class);
            viewHolder.tvValue = (TextView) Utils.findRequiredViewAsType(view, R.id.tv_value, "field 'tvValue'", TextView.class);
        }

        @Override // butterknife.Unbinder
        public void unbind() {
            ViewHolder viewHolder = this.target;
            if (viewHolder == null) {
                throw new IllegalStateException("Bindings already cleared.");
            }
            this.target = null;
            viewHolder.tvName = null;
            viewHolder.tvValue = null;
        }
    }

    public DynamicQueryInfoAdapter(List<DynamicInfo.DetaileInfo> list) {
        this.list = list;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.Adapter
    public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
        return new ViewHolder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_query_land_info, viewGroup, false));
    }

    @Override // androidx.recyclerview.widget.RecyclerView.Adapter
    public void onBindViewHolder(ViewHolder viewHolder, int i) {
        TextView textView = viewHolder.tvName;
        textView.setText(this.list.get(i).getKey() + "");
        if (this.list.get(i).getStrType() == 50) {
            TextView textView2 = viewHolder.tvValue;
            textView2.setText(com.gisocn.onemap.utils.Utils.stampToDate(this.list.get(i).getValue() + ""));
        } else if (this.list.get(i).getStrType() == 30) {
            if (TextUtils.isEmpty(this.list.get(i).getValue()) || "null".equals(this.list.get(i).getValue())) {
                TextView textView3 = viewHolder.tvValue;
                textView3.setText(this.list.get(i).getValue() + "");
                return;
            }
            TextView textView4 = viewHolder.tvValue;
            textView4.setText(String.format("%.3f", Double.valueOf(Double.parseDouble(this.list.get(i).getValue() + ""))));
        } else {
            TextView textView5 = viewHolder.tvValue;
            textView5.setText(this.list.get(i).getValue() + "");
        }
    }

    @Override // androidx.recyclerview.widget.RecyclerView.Adapter
    public int getItemCount() {
        return this.list.size();
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes2.dex */
    public static class ViewHolder extends RecyclerView.ViewHolder {
        @BindView(R.id.tv_name)
        TextView tvName;
        @BindView(R.id.tv_value)
        TextView tvValue;

        ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }
    }
}
